package com.atguigu.gulimall.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * spring session核心原理 装饰者模式
 * 1)、EnableRedisHttpSession导入了RedisHttpSessionConfiguration
 * A、RedisOperationsSessionRepository:redis操作session，session的CRUD类
 * B、SessionRepositoryFilter=>filter：session存储过滤器,每个请求过来都必须经过filter
 * B1、创建的时候，就自动从容器中获取到SessionFactory;
 * B2、原始的request response都被包装成 SessionRepositoryRequestWrapper,SessionRepositoryResponseWrapper
 * B3、wrappedRequest.getSession=>SessionRepositroy中获取的。
 */
@EnableRedisHttpSession//整合redis作为seession存储
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class GulimallAuthServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallAuthServerApplication.class, args);
    }

}
